package com.zp.study.scloud.provider.service;

import com.zp.study.scloud.provider.api.ITestService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;

/**
 * 服务提供者实现类
 *
 */
@RefreshScope
@Service(version = "1.0.0") // 注意使用dubbo的注解
public class TestService implements ITestService {

    // 自定义配置 用于测试nacos配置中心是否运行
    @Value("${pro.name}")
    private String proName;

    @Override
    public String sayStr(String str) {
        return "Provider [proName=" + proName + "] ServiceImpl By Dubbo : " + str;
    }
}
